<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../assets/lib/layui/css/layui.css">
    <link rel="stylesheet" href="../assets/lib/cropper/cropper.css">
    <link rel="stylesheet" href="../assets/css/article_pub.css">
    <script src="../assets/lib/jquery.js"></script>
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">发表文章</div>
        <div class="layui-card-body">
            <form class="pub-form layui-form" action="">
                <!-- 文章标题 -->
                <div class="layui-form-item">
                    <label class="layui-form-label">文章标题</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" required lay-verify="required" placeholder="请输入标题"
                            autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!-- 文章类别 -->
                <div class="layui-form-item">
                    <label class="layui-form-label">选择框</label>
                    <div class="layui-input-block">
                        <select class="art-cate" name="cate_id" lay-verify="required">

                        </select>
                    </div>
                </div>
                <!-- 文章内容 -->
                <div class="layui-form-item">
                    <label class="layui-form-label">文章内容</label>
                    <div class="layui-input-block">
                        <textarea id="content" cols="30" rows="10"></textarea>
                    </div>
                </div>
                <!-- 文章封面 -->
                <div class="layui-form-item">
                    <label class="layui-form-label">文章封面</label>
                    <div class="layui-input-block cropper-wrapper">
                        <!-- 左 裁剪区域 -->
                        <div class="left">
                            <img src="../assets/images/sample2.jpg" alt="">
                        </div>
                        <!-- 右 预览和选择封面按钮 -->
                        <div class="right">
                            <!-- 预览 -->
                            <div class="preview"></div>
                            <!-- 按钮 -->
                            <input type="file" accept="image/png,image.jpeg" class="file" style="display: none;">
                            <button class="choose-img layui-btn layui-btn-danger" type="button">选择封面</button>
                        </div>
                    </div>
                </div>
                <!-- 提交按钮 -->
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">发布</button>
                        <button class="save layui-btn" lay-submit lay-filter="formDemo">存为草稿</button>
                    </div>
                </div>

            </form>
        </div>
    </div>
</body>
<!-- 模板引擎 -->
<script type="text/html" id="select">
    {{each data}}
    <option value="{{$value.id}}">{{$value.cate_name}}</option>
    {{/each}}
</script>
<script src="../assets/lib/layui/layui.all.js"></script>
<script src="../assets/js/baseApi.js"></script>
<script src="../assets/lib/template-web.js"></script>
<script src="../assets/lib/tinymce/tinymce.min.js"></script>
<script src="../assets/lib/tinymce/tinymce_setup.js"></script>
<script src="../assets/lib/cropper/Cropper.js"></script>
<script src="../assets/lib/cropper/jquery-cropper.js"></script>
<script src="../assets/js/article_pub.js"></script>

</html>